<?php
	require_once(dirname(__FILE__)."/../core/safeParam.php");

	$id = $_GET['id']; 
	
	if($id == ""){
  		$news = $database->select("SELECT * from news where rid = ".RID." order by date");
	} else {
  		$news_s = $database->select("SELECT * from news where id = ".$id." ");
  		$news = $news_s[0];
	}

	$smarty->assign("news", $news);
?>
